import { createStore } from 'vuex';
import createPersistedState from 'vuex-persistedstate';

export default createStore( {
  state: {
    token: ''
  },
  getters: {},
  mutations: {
    // 保存token
    SAVE_TOKEN: ( state, payload ) => state.token = payload
  },
  actions: {},
  modules: {},
  plugins: [
    createPersistedState( )
  ]
})